package com.huabo.contract.mysql.entity;

import java.math.BigDecimal;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import java.util.Date;

import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Transient;

/**
 * <p>
 * 
 * </p>
 *
 * @author huabo
 * @since 2022-03-14
 */
@Data
  @EqualsAndHashCode(callSuper = false)
    @TableName("TBL_CONTRACT_INVOICESMANAGEMEN")
@ApiModel(value="TblContractInvoicesmanagemen对象", description="")
public class TblContractInvoicesmanagemenMySql implements Serializable {
//发票号
    //发票管理
    private static final long serialVersionUID = 1L;

      @TableId("INVOICEID")
      @Id
      @GeneratedValue(strategy = GenerationType.IDENTITY,generator = "select HIBERNATE_SEQUENCE.nextval from dual")
      private BigDecimal invoiceid;

    @TableField("BUDGETID")
    private BigDecimal budgetId;

    @TableField("INVOICENO")//发票号
    private String invoiceno;

    @TableField("INVOICEMONEY")//发票金额
    private BigDecimal invoicemoney;

    @TableField("INVOICEDATE")//发票开具日期
    @JSONField(format = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    private Date invoicedate;

    @TableField("INVOICEHEADTEXT")//发票抬头
    private String invoiceheadtext;

    @TableField("INVOICEPOST")//税率
    private BigDecimal invoicepost;

    @TableField("INVOICECONTENT")//发票内容
    private String invoicecontent;

    @TableField("INVOICETYPE")//发票类型：增值税专用发票、增值税普通发票
    private String invoicetype;

    @TableField("INVOICESTATUS")//发票状态1-未开票，2-已开票，3-未收款，4-已收款，5-已退票
    private BigDecimal invoicestatus;

    @TableField("INVOICESPDATE")//收票日期
    private Date invoicespdate;

    @TableField("INVOICESPORG")//收票单位
    private String invoicesporg;

    @TableField("INVOICEKPORG")//开票单位
    private String invoicekporg;

    @TableField("INVOICEOGR")
    private BigDecimal invoiceogr;

    @TableField("CREATESTAFF")
    private BigDecimal createstaff;

    @TableField("TINUMBER")
    private String tinumber;//纳税人识别号

    @TableField("OUTSIDEID")
    private String outsideid;

//    @TableField("TINUMBER")
//    private String taiNumber;

    @Transient
    private TblOrganizationMySql invoiceOrg;

    @Transient//无税金额
    private String wushuijine;

    @Transient//税额
    private String shuie;

    @Transient//票据向对方
    private String budgetName;

    @Transient
    private TblCyhwProjectbudgetMySql budget;

    @Transient
    private TblStaffMySql create;

    //映射TblStaff

    @Transient
    private BigDecimal staffid;//主键ID
    @Transient
    private String realname;//真实名字
    @Transient
    private String fixedphone;//固定电话
    @Transient
    private String address;//地址
    @Transient
    private String email;//邮箱
    @Transient
    private String miblephone;//手机号码
    @Transient
    private String memo;//备注
    @Transient
    private String username;//用户名（登录名）
    @Transient
    private String password;//密码
    @Transient
    private BigDecimal jobid;//岗位ID
    @Transient
    private Date createDate;
    @Transient
    private Integer status;//状态（1启用，0弃用）
    @Transient
    private TblRoleMySql  trole;
    @Transient
    private BigDecimal orgid;//组织Id
    @Transient
    private Integer outSideId; //标识用户来源 为null是本系统，1：蜂信，2,蜂信购买后的用户   3：华博云系统注册用户管理员  以后可能为2,3...来表示其它来源
    @Transient
    private String outSideOpenId; //外部同步企业来源Id
}
